package cn.wolfcode.luowowo.comment.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * 攻略评论
 */
@Setter
@Getter
@Document("user_goods")   //文档所在集合名字
public class UserGoods implements Serializable {
    @Id
    private String id;  //spring - data 默认封装成 ObjectId

    private Long userId;    //用户id

    private Long itemShopId;            //商品id
    private String name;       //商品名字
    private String imgUrl;     //商品图片
    private String info;       //商品简介
    private Integer rest;      //商品剩余

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date date;    //兑换时间

}
